package com.example.ch02xyzonecom.enums;
public enum ResultCode {
    /*
    请求返回状态码和说明信息
     */
    SUCCESS(200, null),

    BAD_REQUEST(400, "参数或者语法不对"),
    UNAUTHORIZED(401, "认证失败"),
    LOGIN_ERROR(401, "登陆失败，用户名或密码无效"),
    LOGIN_FAILURE(401,"请重新登录"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "请求的资源不存在"),
    OPERATE_ERROR(405, "操作失败，请求操作的资源不存在"),
    NO_DATA(405, "暂无数据"),
    TIME_OUT(408, "请求超时"),

    SERVER_ERROR(500, "服务器内部错误"),
    ACCOUNT_NOT_VERIFIED(501,"用户未验证"),
    EMAIL_NOT_VERIFIED(502,"邮箱未验证"),

    REPLACE_TOKEN(666, "替换token"),

    //#####################微信小程序 start ########################//

    WXMA_INVALID_TOKEN_CODE(1001, "微信小程序token无效的异常"),
    WXMA_LOGIN_AUTHORIZATION_FAIL(1002, "微信小程序登录授权失败");

    //#####################微信小程序 end ########################//


    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
